﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Student/Student.Master" AutoEventWireup="true"
    CodeBehind="OneCourseDetail.aspx.cs" Inherits="EngineeringMaster.Student.OneCourseDetail" %>

<asp:Content ID="Content1" ContentPlaceHolderID="contentHead" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="contentBody" runat="server">
    <link href="../Student.css" rel="stylesheet" type="text/css" />
    <div align="center">
        <asp:DetailsView ID="DetailsView2" runat="server" AutoGenerateRows="False" CellPadding="4"
            ForeColor="#333333" GridLines="None" Height="440px" Width="600px" DataSourceID="SqlDataSource1">
            <FooterStyle Font-Bold="True" />
            <CommandRowStyle Font-Bold="True" />
            <RowStyle />
            <FieldHeaderStyle Font-Bold="True" />
            <PagerStyle HorizontalAlign="Center" />
            <Fields>
                <asp:BoundField DataField="CourseName" HeaderText="课程名" SortExpression="CourseName" />
                <asp:BoundField DataField="CourseYear" HeaderText="上课年" SortExpression="CourseYear" />
                <asp:BoundField DataField="CourseSemester" HeaderText="课程学期" SortExpression="CourseSemester" />
                <asp:TemplateField HeaderText="是否双语">
                    <ItemTemplate>
                        <asp:Label ID="Label1" runat="server" Text='<%#((Eval("Bilingual") != null) && Eval("Bilingual") == "1") ? "是" : "否"%>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="面向外部">
                    <ItemTemplate>
                        <asp:Label ID="Label2" runat="server" Text='<%#((Eval("ExternalOrNot") != null) && Eval("ExternalOrNot") == "1") ? "是" : "否"%>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:BoundField DataField="Textbook" HeaderText="教科书" SortExpression="Textbook" />
                <asp:BoundField DataField="ExamMode" HeaderText="考试方式" SortExpression="ExamMode" />
                <asp:BoundField DataField="StudentNumber" HeaderText="学生人数" SortExpression="StudentNumber" />
                <asp:BoundField DataField="Credit" HeaderText="信用" SortExpression="Credit" />
                <asp:BoundField DataField="CreditHour" HeaderText="信用时间" SortExpression="CreditHour" />
                <asp:BoundField DataField="Place" HeaderText="上课地点" SortExpression="Place" />
                <asp:BoundField DataField="ClassTime" HeaderText="上课时间" SortExpression="ClassTime" />
                <asp:BoundField DataField="InstruMode" HeaderText="教学方式" SortExpression="InstruMode" />
                <asp:BoundField DataField="Property" HeaderText="属性" SortExpression="Property" />
                <asp:BoundField DataField="Category" HeaderText="课程类别" SortExpression="Category" />
            </Fields>
            <HeaderStyle Font-Bold="True" />
            <EditRowStyle />
            <AlternatingRowStyle />
        </asp:DetailsView>
        <p style="margin-left: 40px">
            <br />
        </p>
      <div style="float: right; margin-right: 300px; margin-top: 20px">
        <asp:Button ID="Button1" runat="server" Text="返回" PostBackUrl="~/Student/CourseDetail.aspx"
            CssClass="my_button" />
        </div>
    </div>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:MSEDataBaseConnectionString %>"
        SelectCommand="SELECT [CourseName], [CourseYear], [CourseSemester], [Bilingual], [ExternalOrNot], [Textbook], [ExamMode], [StudentNumber], [Credit], [TeaSchoolID], [CreditHour], [Place], [ClassTime], [InstruMode], [Property], [Category] FROM [Course] WHERE ([CourseID] = @CourseID)">
        <SelectParameters>
            <asp:QueryStringParameter Name="CourseID" QueryStringField="CourseID" Type="String" />
        </SelectParameters>
    </asp:SqlDataSource>
</asp:Content>
